//表单的验证

import VeeValidate from 'vee-validate'
import ZH_CN from 'vee-validate/dist/locale/zh_CN'
export default function (Vue) {


    Vue.use(VeeValidate)
    //配置自定义messages
    VeeValidate.Validator.localize("ZH_CN", {
        messages: {
            ...ZH_CN.messages,
            is: (value) => {
                return "与上一个不符合" + value
            },

        },
        // 配置替换字符
        attributes: {
            rePassword: '第二遍密码',
            password: '密码',
            phone: '电话',
            sendCode: '验证码',
            green: '协议'
        }

    })
    VeeValidate.Validator.extend("Isagree", {
        validate: (value) => {
            return value
        },
        getMessage: (value) => {
            return "必须同意" + value
        }
    })
}